package com.xiaotu.code.model.blog;

import java.io.Serializable;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Table;

import org.hibernate.search.annotations.Field;
import org.hibernate.search.annotations.Index;
import org.hibernate.search.annotations.Indexed;
import org.hibernate.search.annotations.Store;

/**
 * 博客实体类.
 * 
 * @author chenxiangrong
 * 
 */
@Entity
@Table(name = "BLOG")
@Indexed
public class Blog implements Serializable {

	/**
	 * 
	 */
	private static final long serialVersionUID = 1429972927517318341L;
	private Long id;

	private String title;
	private String content;

	@Id
	@Column(name = "ID")
	public Long getId() {
		return id;
	}

	public void setId(Long id) {
		this.id = id;
	}

	@Column(name = "TITLE")
	@Field(index = Index.TOKENIZED, store = Store.NO)
	public String getTitle() {
		return title;
	}

	public void setTitle(String title) {
		this.title = title;
	}

	@Column(name = "CONTENT")
	public String getContent() {
		return content;
	}

	public void setContent(String content) {
		this.content = content;
	}

}
